package com.eliza.music.model.entity

import androidx.room.ColumnInfo
import androidx.room.Entity
import androidx.room.PrimaryKey
import androidx.room.TypeConverters
import kotlinx.serialization.Serializable
import kotlin.random.Random

var random = Random(100)

@Serializable
@TypeConverters(Converter::class)
@Entity(tableName = "song")
data class Song(
    @PrimaryKey(autoGenerate = true) override var id: Int = 0,
    override var title: String = "",
    override var icon: String = "",
    override var description: String = "",
    var artist: String = "",
    var path: String = "",


    @ColumnInfo(
        typeAffinity = ColumnInfo.INTEGER,
    ) var duration: Int = 60,
    @ColumnInfo(name = "is_vip") var isVip: Boolean = false,
    @ColumnInfo(name = "is_temp") var isTemp: Boolean = false,
    @ColumnInfo(typeAffinity = ColumnInfo.TEXT) var uri: String = "",
) : BasicInfo()

